package com.pubinfo.passbook.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.pubinfo.passbook.common.entity.TContractBase;
import com.pubinfo.passbook.common.model.dto.contract.*;
import com.pubinfo.passbook.common.model.dto.system.RolePermission;
import com.pubinfo.passbook.common.model.vo.base.MyPage;
import com.pubinfo.passbook.common.model.vo.contract.ContractBaseExcel;
import com.pubinfo.passbook.common.model.vo.contract.ContractDetailInfoVo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author admin
 * @description 针对表【t_contract_base(合同基础信息表)】的数据库操作Mapper
 * @createDate 2021-12-03 10:39:59
 * @Entity com.pubinfo.passbook.common.entity.TContractBase
 */
public interface TContractBaseMapper extends BaseMapper<TContractBase> {
    
    /**
     * 查询合同管理列表
     */
    MyPage<TContractBase> selectContractList(@Param("page") MyPage<TContractBase> page, @Param("p") ContractListParam param);

    /**
     * 获取合同详情信息
     */
    ContractDetailInfoVo getContractDetailInfo(@Param("contractId") Integer contractId);
  
  List<String> listCompany(@Param("keyword") String keyword, @Param("p") RolePermission rolePermission);

  /**
   * 更改可开票金额
   */
  Integer modifyInvoiceAmount(@Param("contractId") Integer contractId, @Param("amount") BigDecimal amount);
  
  /**
   * 已认领合同情况查询
   */
  MyPage<ClaimedList> getContractClaimedList(@Param("page") MyPage<ClaimedList> page, @Param("p") ContractTrialParam param);
  
  /**
   * 下载excel
   */
  List<ClaimedList> getContractClaimedList(@Param("p") ContractTrialParam param);

    /**
     * 合同清洗结果查询
     */
    MyPage<ContractClearResultList> getContractClearResultList(@Param("page") MyPage<ContractClaerParam> page,@Param("param") ContractClaerParam param);

    List<ContractClearResultList> getContractClearResultList(@Param("param") ContractClaerParam param);

    /**
     * 查询迁移赔补数据
     */
    List<TContractBase> selectChangeUint(@Param("c") ChangeUnitParam changeUnitParam);
  
  /**
   * 查询迁移赔补列表
   */
  List<TContractBase> selectChangeUintList(IPage<SelectChangeUnitParam> iPage, @Param("c") ChangeUnitParam changeUnitParam);
  
  List<ContractBaseExcel> listByStatus(Integer status);
}
